<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Open Event Machine API: event_machine_helper.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Open Event Machine API
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('event__machine__helper_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">event_machine_helper.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Event Machine helper functions and macros.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="event__machine_8h_source.html">event_machine.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="event__machine__core__mask_8h_source.html">event_machine_core_mask.h</a>&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for event_machine_helper.h:</div>
<div class="dyncontent">
<div class="center"><img src="event__machine__helper_8h__incl.png" border="0" usemap="#event__machine__helper_8h" alt=""/></div>
<map name="event__machine__helper_8h" id="event__machine__helper_8h">
<area shape="rect" id="node3" href="event__machine_8h.html" title="Event Machine API v1.0." alt="" coords="312,177,429,205"/><area shape="rect" id="node19" href="event__machine__core__mask_8h.html" title="Event Machine core mask functions." alt="" coords="355,83,496,127"/><area shape="rect" id="node5" href="event__machine__types_8h.html" title="Event Machine basic types." alt="" coords="103,254,257,282"/></map>
</div>
</div>
<p><a href="event__machine__helper_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa1e8e27303de2dfc1d3209d492cff662"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="event__machine__helper_8h.html#aa1e8e27303de2dfc1d3209d492cff662">em_error_format_string</a> (char *str, size_t size, <a class="el" href="event__machine__types_8h.html#a1d373bd8469414626259c3ea14b5ee2a">em_eo_t</a> eo, <a class="el" href="event__machine__types_8h.html#a125a101c5db94235eb758c8c32ab2628">em_status_t</a> error, <a class="el" href="event__machine__types_8h.html#a5b0a5fb6ffe7f0fdb90caa388070dff3">em_escope_t</a> escope, va_list args)</td></tr>
<tr class="memdesc:aa1e8e27303de2dfc1d3209d492cff662"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format error string.  <a href="#aa1e8e27303de2dfc1d3209d492cff662">More...</a><br/></td></tr>
<tr class="separator:aa1e8e27303de2dfc1d3209d492cff662"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9089758c63f23c62247625f13f6d678c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="event__machine__helper_8h.html#a9089758c63f23c62247625f13f6d678c">em_core_id_get_physical</a> (int core)</td></tr>
<tr class="memdesc:a9089758c63f23c62247625f13f6d678c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a logical core id to a physical core id.  <a href="#a9089758c63f23c62247625f13f6d678c">More...</a><br/></td></tr>
<tr class="separator:a9089758c63f23c62247625f13f6d678c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76e2c37a7fdec0c2fa94b18ce30e3655"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="event__machine__helper_8h.html#a76e2c37a7fdec0c2fa94b18ce30e3655">em_core_mask_get_physical</a> (<a class="el" href="unionem__core__mask__t.html">em_core_mask_t</a> *phys, const <a class="el" href="unionem__core__mask__t.html">em_core_mask_t</a> *logic)</td></tr>
<tr class="memdesc:a76e2c37a7fdec0c2fa94b18ce30e3655"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a logical core mask to a physical core mask.  <a href="#a76e2c37a7fdec0c2fa94b18ce30e3655">More...</a><br/></td></tr>
<tr class="separator:a76e2c37a7fdec0c2fa94b18ce30e3655"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Event Machine helper functions and macros. </p>

<p>Definition in file <a class="el" href="event__machine__helper_8h_source.html">event_machine_helper.h</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aa1e8e27303de2dfc1d3209d492cff662"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int em_error_format_string </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="event__machine__types_8h.html#a1d373bd8469414626259c3ea14b5ee2a">em_eo_t</a>&#160;</td>
          <td class="paramname"><em>eo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="event__machine__types_8h.html#a125a101c5db94235eb758c8c32ab2628">em_status_t</a>&#160;</td>
          <td class="paramname"><em>error</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="event__machine__types_8h.html#a5b0a5fb6ffe7f0fdb90caa388070dff3">em_escope_t</a>&#160;</td>
          <td class="paramname"><em>escope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&#160;</td>
          <td class="paramname"><em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format error string. </p>
<p>Creates an implementation dependent error report string from EM internal errors.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>Output string pointer </td></tr>
    <tr><td class="paramname">size</td><td>Maximum string lenght in characters </td></tr>
    <tr><td class="paramname">eo</td><td>EO id </td></tr>
    <tr><td class="paramname">error</td><td>Error code (EM internal) </td></tr>
    <tr><td class="paramname">escope</td><td>Error scope (EM internal) </td></tr>
    <tr><td class="paramname">args</td><td>Variable arguments</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Output string length </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="test_appl_error_8c-example.html#a16">test_appl_error.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a9089758c63f23c62247625f13f6d678c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int em_core_id_get_physical </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>core</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts a logical core id to a physical core id. </p>
<p>Mainly needed when interfacing HW specific APIs</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">core</td><td>logical (Event Machine) core id</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Physical core id</dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000006">Todo:</a></b></dt><dd>Needs better spec and review </dd></dl>

</div>
</div>
<a class="anchor" id="a76e2c37a7fdec0c2fa94b18ce30e3655"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void em_core_mask_get_physical </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="unionem__core__mask__t.html">em_core_mask_t</a> *&#160;</td>
          <td class="paramname"><em>phys</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="unionem__core__mask__t.html">em_core_mask_t</a> *&#160;</td>
          <td class="paramname"><em>logic</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts a logical core mask to a physical core mask. </p>
<p>Mainly needed when interfacing HW specific APIs</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">phys</td><td>Core mask of physical core ids </td></tr>
    <tr><td class="paramname">logic</td><td>Core mask of logical (Event Machine) core ids</td></tr>
  </table>
  </dd>
</dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000007">Todo:</a></b></dt><dd>Needs better spec and review </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="event__machine__helper_8h.html">event_machine_helper.h</a></li>
    <li class="footer">Generated on Wed Aug 7 2013 15:17:39 for Open Event Machine API by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
